<?php
$xml = <<<XML
<?xml version="1.0"?>
<ns_ou:ou xmlns:ns_ou="http://open.ac.uk/library/ava/" xmlns:ou="http://purl.org/dc/elements/1.1/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://open.ac.uk/library/ava/ou.xsd http://open.ac.uk/library/ava/ns_ou.xsd">
  <ou:Program>
    <ou:Identifier>program</ou:Identifier>
    <ou:ProductionNumber>A480S</ou:ProductionNumber>
    <ou:VideofinderNumber>5683</ou:VideofinderNumber>
    <ou:LibControlNumber></ou:LibControlNumber>
    <ou:SV_Number></ou:SV_Number>
    <ou:BAP_Number></ou:BAP_Number>
    <ou:OU_ProjectCode></ou:OU_ProjectCode>
    <ou:CourseCode>A216/05</ou:CourseCode>
    <ou:ItemCode></ou:ItemCode>
    <ou:ItemVersion></ou:ItemVersion>
    <ou:Title>Modernist Primitivism: Gaugain and Pont-Aven</ou:Title>
    <ou:AltTitle></ou:AltTitle>
    <ou:Series></ou:Series>
    <ou:Producer>N Levinson</ou:Producer>
    <ou:Director></ou:Director>
    <ou:Contributor>Perry G Salvage N</ou:Contributor>
    <ou:RecordingDate>06/06/99</ou:RecordingDate>
    <ou:TxDate></ou:TxDate>
    <ou:Duration></ou:Duration>
    <ou:Publisher></ou:Publisher>
    <ou:PublicationYear></ou:PublicationYear>
    <ou:IsJointProduction></ou:IsJointProduction>
    <ou:Note></ou:Note>
    <ou:Summary>Gaugain Paul 1880's Brittany modernist primitivism Pont-Aven romantic myths and contradictions tourism distorting historical realities 19th Century life artistic practice Le Pouldu</ou:Summary>
    <ou:Footage>BAP12366- (IMAGES) CHAPEL EXTS/ PLACE PAUL GAUGUIN/ PONT-AVEN PRETTIES/ RIVER FLOWING THROUGH TOWN/ VARIOUS GVs AROUND TOWN inc. BRIDGE and SHOPS/ GALERIE LA BELLE ANGELE/ PONT-AVEN GVs/ CHAPEL EXTS and INTS./ JESUS ON CROSS BAP12367- (IMAGES) CHAPEL INTS. inc. DECORATED CARVINGS/ WHEATFIELD IN FRENCH COUNTRYSIDE/ WHEATFIELD (FULL-SCREEN)/ CHICKENS/ FARMHOUSE/ OLD PHOTOS IN GALLERY/ PAINTINGS BY GAUGAIN/ PTC BAP12263- (IMAGES) PAINTINGS/ ART GALLERY/ PHOTOS/ ARTWORK ON BILLBOARD/ RELIGIOUS PROCESSION/ PROCESSION OF CLERGY/ GVs OF CEREMONY BAP12368- (IMAGES) cont./ OFFERING HOLY COMMUNION/ MORE GVs/ VARIOUS MARKET STALLS/ WAVES AGAINST ROCKS and BEACH/ SEAWEED/ MORE SEA and BEACH GVs BAP12369- (IMAGES) HOUSE ON CLIFF/ SEA and ROCKS/ SEASIDE GVs/ ORCHARDS/ SETTINGS FOR GAUGUIN PAINTINGS/ FARMYARD (FRENCH)/ COW/ CHICKEN COUP/ WS HOUSE WITH SEA BEHIND/ SEA and ROCKS/ WOODLAND PATHS etc BAP12370- WATERFLIES/ ROCKFACE/ WOODLAND DELLS and STREAMS/ BRIDGE and RIVERSIDE PROPERTY/ VEGETABLE GARDEN/ FARMHOUSE INTS. WITH GAUGUIN ARTWORK BAP12371- cont./ MORE FARMHOUSE INTS./ SHOP FRONT/ STONE CROSS CARVINGS/ OAK LEAVES/ HYDRANGEUS/ PICTURESQUE HOUSES/ RUINED FIREPLACES/ OLD STONEWORK/ ANCIENT STONE RIVER CROSSING/ TOWN GVs</ou:Footage>
    <ou:TopicalTerm></ou:TopicalTerm>
    <ou:GoneToBFI></ou:GoneToBFI>
    <ou:MDate></ou:MDate>
    <ou:CDate></ou:CDate>
  </ou:Program>
  </ns_ou:ou>
XML;

$sxe = new SimpleXMLElement($xml);

$namespaces = $sxe->getNamespaces(true);
var_dump($namespaces);

$xml_out=new SimpleXMLElement($xml,NULL,false,'http://purl.org/dc/elements/1.1/');
print_R($xml_out->Program[0]->ProductionNumber);

?>